[SUBROUTINE]
version = 1.14
icon = circle.png
name = Taper / Cone
image = circle.png
type = t-hole
help = <b>Creates a Taper Hole or a Cone</b>
 Select Inside for a hole or Outside for a cone
order = act fcut h1 h4 cx cy h5 opt d ang h3 dir stp s u_s ugc dpt u_dpt ugcd

[PARAM_ACT]
name = Active
type = bool
value = 1

[PARAM_FCUT]
name = Show design
type = bool
value = 1

[PARAM_H4]
name = Coords
type = sub-header

[PARAM_H5]
name = Type and size
type = sub-header

[PARAM_CX]
name = cX
type = float
icon = center.png
tool_tip = Center of hole or cone
value = 0
metric_value = 0.0
header = h4

[PARAM_CY]
name = cY
type = float
icon = center.png
tool_tip = Center of hole or cone
value = 0
metric_value = 0.0
header = h4

[PARAM_D]
name = Top diameter
type = float
minimum_value = 0.0
icon = diameter.png
tool_tip = Diameter
value = 0.625
header = h5
metric_value = 15

[PARAM_ANG]
name = Angle
type = float
digits = 2
minimum_value = 0.0
maximum_value = 30.0
icon = angle-vert.png
tool_tip = Angle of sidewall
value = 10
header = h5
suffix = °

[PARAM_H3]
name = Milling
type = sub-header

[PARAM_OPT]
name = Type
type = combo
options = Taper hole=0:Cone=-1
icon = g4x.png
tool_tip = Hole will cut inside, cone for outside
value = 0
header = h5

[PARAM_DIR]
name = Direction
type = combo
options = Clockwise=2:Counter-Clockwise=3
icon = cw-ccw.png
tool_tip = Direction of path
value = 3
header = h3

[PARAM_STP]
name = Cut step
type = float
icon = dz.png
tool_tip = Step each pass
value = 0.020
header = h3
metric_value = 0.5
minimum_value = 0
not_allowed = 0

[PARAM_S]
name = Cut start
type = combo-user
options = _("User defined=0:Surface=1:Half=2:One quarter=3:Three quarter=4:G-Code=5")
icon = surface.png
tool_tip = Pre or user defined
value = 1
header = h3
links = u_s=0:ugc=5

[PARAM_U_S]
name = User start
type = float
value = 0.0
metric_value = 0.0
header = h3
hidden = 1

[PARAM_UGC]
name = User gcode
type = gcode
value =
header = h3
hidden = 1

[PARAM_UGCD]
name = User depth gcode
type = gcode
value =
header = h3
hidden = 1

[PARAM_DPT]
name = _("Cut down to")
type = combo-user
options = _("User defined=0:Through=1:Bottom=2:Half=3:One quarter=4:Three quarter=5:G-Code=6")
icon = depth.png
tool_tip = Pre or user defined
value = 1
header = h3
links = u_dpt=0:ugcd=6

[PARAM_U_DPT]
name = User depth
type = float
value = -0.5
metric_value = -12.0
header = h3
hidden = 1

[DEFINITIONS]
content =
;	<eval>self.include_once(file name here)</eval>

[CALL]
content =
	(begin #sub_name)
	(taper hole or cone author : Fernand Veilleux)
	
	o<#self_id_active> if [#param_act and [#<_tool_usage> LE 2]] (if active and right tool usage)
		o<select> CALL [31] [#param_s] [#param_u_s] [#<surface>] [#<surface> - #<wp_depth> / 2] [#<surface> - #<wp_depth> / 4] [#<bottom> + #<wp_depth> / 4] [#param_ugc]
		o<select> CALL [32] [#param_dpt] [#param_u_dpt] [#<bottom_through>] [#<bottom>] [#<surface> - #<wp_depth> / 2] [#<surface> - #<wp_depth> / 4] [#<bottom> + #<wp_depth> / 4] [#param_ugcd]
		
;		o<taper> CALL [#param_cx] [#param_cy] [#param_d] [#param_ang] [#param_opt] [#param_dir] [#31] [#param_stp] [#32] [#param_fcut]
		
	o<#self_id_active> endif
	(end #sub_name)
